package com.example.myapplication.galleryfinal;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.example.myapplication.R;
import java.util.List;
import cn.finalteam.galleryfinal.GalleryFinal;
import cn.finalteam.galleryfinal.model.PhotoInfo;

public class GalleryfinalActivity extends AppCompatActivity {

    private GalleryFinal.OnHanlderResultCallback mOnHanlderResultCallback=new GalleryFinal.OnHanlderResultCallback() {

        @Override
        public void onHanlderSuccess(int reqeustCode, List<PhotoInfo> resultList) {
            Log.e("GalleryfinalActivity","onHanlderSuccess");
        }

        @Override
        public void onHanlderFailure(int requestCode, String errorMsg) {
            Log.e("GalleryfinalActivity","onHanlderFailure");
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_galleryfinal);
        Button pick = findViewById(R.id.button7);

        pick.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                GalleryFinal.openGallerySingle(200,mOnHanlderResultCallback);
//                GalleryFinal.openGalleryMuti(REQUEST_CODE_GALLERY, mOnHanlderResultCallback);
//                GalleryFinal.openCamera(200, mOnHanlderResultCallback);

            }
        });
    }
}